package com.yuyu.bean;

import com.yuyu.uitlbean.PageData;

public class EmployeePageDataOfMybatis {
    private Integer start_num;
    private Integer page_size;
    private String condition;

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public Integer getStart_num() {
        return start_num;
    }

    public void setStart_num(Integer start_num) {
        this.start_num = start_num;
    }

    public Integer getPage_size() {
        return page_size;
    }

    public void setPage_size(Integer page_size) {
        this.page_size = page_size;
    }

    public static EmployeePageDataOfMybatis handle(PageData pageData){
        EmployeePageDataOfMybatis pageDataOfMybatis = new EmployeePageDataOfMybatis();
        pageDataOfMybatis.setStart_num((pageData.getPage_number()-1)*pageData.getPage_limit());
        pageDataOfMybatis.setPage_size(pageData.getPage_limit());
        return pageDataOfMybatis;
    }

    @Override
    public String toString() {
        return "EmployeePageDataOfMybatis{" +
                "start_num=" + start_num +
                ", page_size=" + page_size +
                ", condition='" + condition + '\'' +
                '}';
    }
}
